package com.fzq.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzq.dao.po.RbacPerms;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RbacPermsMapper extends BaseMapper<RbacPerms> {

    @Select("select p.percode from rbac_user c\n" +
            "    left join rbac_user_perm cp on c.id = cp.userid \n" +
            "    left join rbac_perms p on p.id = cp.permid where c.username = #{username}")
    List<String> permsList(String username);

}
